package stringTest;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class test3TestTest {

	public void testTest() {

//		String s1 = "java regular exp";
//		String s2;
//		Pattern p;
//		Matcher m;
//		boolean b;
//		p = Pattern.compile("\\s.");
//		m = p.matcher(s1);
//		b = m.find();
//		
//		if (b == true) {
//			s2 = m.group();
//			System.out.println(s2); // regular�� ��µȴ�.
//		}
		String tempStr = "how to use the LG mobile. and htt://www.naver.com/index.jsp/id=12312313123 ";
		Pattern ptn = Pattern.compile("\\s");
		Matcher matcher  = ptn.matcher(tempStr);
		
		//show matches
		while(matcher.find()) {
			System.out.printf("Found: \"%s\"  from %d to %d.%n",
					matcher.group(),matcher.start(),matcher.end());
					
		}

	}

}
